const db = require('../db/index');
const DataType = require('sequelize');
/**es6继承 会员卡表*/
class Question extends DataType.Model {}
Question.init(
    {
        id: {
            type: DataType.INTEGER,
            allowNull: false,
            autoIncrement: true,
            primaryKey: true
        },
        question: {
            type: DataType.STRING,
            comment: '问题',
            allowNull: false
        },
        answer: {
            type: DataType.TEXT,
            comment: '解答',
            defaultValue: 0,
            allowNull: false
        }
    },
    {
        tableName: 'question',
        modelName: 'question',
        sequelize: db
    }
);
// Question.sync({ force: true });
exports['default'] = Question;
